From: Russell King Date: Mon, 23 Nov 2009 08:44:10 +0000 (+0100) Subject: ALSA: AACI cleanup X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~19839^2~16^2~13 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=88cdca9c7376f2220171d09dfc2f9e41b4834435;p=linux-4.9.git ALSA: AACI cleanup Fix the buffer size calculation to use the size which ALSA is expecting. Signed-off-by: Russell King Signed-off-by: Takashi Iwai --- diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 1f0f8213e2d5..a03fe80a7a73 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -18,10 +18,7 @@ #include #include #include - -#include -#include -#include +#include #include #include @@ -534,7 +531,7 @@ static int aaci_pcm_prepare(struct snd_pcm_substream *substream) struct aaci_runtime *aacirun = runtime->private_data; aacirun->start = (void *)runtime->dma_area; - aacirun->end = aacirun->start + runtime->dma_bytes; + aacirun->end = aacirun->start + snd_pcm_lib_buffer_bytes(substream); aacirun->ptr = aacirun->start; aacirun->period = aacirun->bytes = frames_to_bytes(runtime, runtime->period_size);